#include <iostream>
using namespace std;
int max( int a, int b, int c); //function tou,function shengming.
int min( int a, int b, int c);
void output ( int a);//shengming shuchu hanshu.
int main()
{
	int a, b, c;
	cout << "shuru sange zhengshu:" << endl;
	cin >> a >> b >> c;
	output (max(a, b, c));//max de fanhuizhi zuowei output de shican.
	output (min(a, b, c));//min de fanhuizhi zuowei output de shican.
	return 0;
}

int max (int a, int b, int c)
{
	if (a >= b && a >= c) return a;
	if (b >= a && b >= c) return b;
	return c;
}

int min (int a, int b, int c)
{
	if (a <= b && a <= c) return a;
	if (b <= a && b <= c) return b;
	return c;
}

 void output (int a)
 {
 	cout << a << endl;
 	return;
 }
 